function req(obj) {
	console.log('request')
	return new Promise((resolve, reject) => {
		// var BASE_URL = "http://192.168.2.98:5000"
		if (obj.id) {
			var token =
				'eyJhbGciOiJIUzUxMiIsInppcCI6IkRFRiJ9.eNpUjTsOwjAQRO-yNYX_n3Rr1pbShAI4QAQWRBCwTIOEuDuGIhLTvdEbzQs29dQfoQPOGOOwAiylp8ZIES3DyOU6KiMdCq18QJdIMKfRNnX_yPW3DR41S6SCQ1KJEuqvHriQPjoKorm7XOfpNl6XrxbV-mE6XIZxzv_t9nwvi9k4Pwt03EghpVFWvz8AAAD__w.Bmd6nb12j5RRylTjYQjMhzAvwenpAe0WAaCihDLAxcTkfVAvXaR2IzcUNycHCxbtkAMpHVcUIxgPqG2BfC8E_w';
		} else {
			var token = uni.getStorageSync('token');
		}
		// var BASE_URL = "https://api.cloudmis.cn"  //原来的域名
		var BASE_URL = "https://api.xhm2006.com" //新域名 
		var method = obj.method || 'POST';
		var url = BASE_URL + obj.url;
		var data = obj.data;
		console.log(data, 'request444')
		var headers = obj.headers || {
			ContentType: 'application/json',
			apiVersion: '1.0',
			token: token
		};
		uni.request({
			url: url,
			data: data,
			method: method,
			header: headers,
			success: (res => {
				resolve(res.data)
			}),
			fail: ((err) => {
				reject(err)
			})
		})

		// 登录之后会吧token保存在本地存储  以后携带token执行这个请求
		// 怎么写

	})
}
export default req
